
package com.roc.pojo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class TblDictionaryLayerItemId implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@Column(name="DIC_TYPE",length=50)
	private String dicType;//字典类型
	
	@Column(name="DIC_CODE",length=50)
	private String dicCode;//代码
	
	@Column(name="DIC_PCODE",length=50)
	private String dicPcode;//父代码
	
	@Column(name="DIC_LEVEL",length=50)
	private String dicLevel;//层级(从0开始)

	public String getDicType() {
		return dicType;
	}

	public void setDicType(String dicType) {
		this.dicType = dicType;
	}

	public String getDicCode() {
		return dicCode;
	}

	public void setDicCode(String dicCode) {
		this.dicCode = dicCode;
	}

	public String getDicPcode() {
		return dicPcode;
	}

	public void setDicPcode(String dicPcode) {
		this.dicPcode = dicPcode;
	}

	public String getDicLevel() {
		return dicLevel;
	}

	public void setDicLevel(String dicLevel) {
		this.dicLevel = dicLevel;
	}

    public boolean equals(Object other) {  
        if ((this == other))  
            return true;  
        if ((other == null))  
            return false;  
        if (!(other instanceof TblTermInfId))  
            return false;
        TblDictionaryLayerItemId castOther = (TblDictionaryLayerItemId) other;  
  
        return ((this.getDicType() == castOther.getDicType()) || (this.getDicType() != null && castOther.getDicType() != null && this.getDicType().equals(castOther.getDicType())))  
                && ((this.getDicCode() == castOther.getDicCode()) || (this.getDicCode() != null && castOther.getDicCode() != null && this.getDicCode().equals(  
                        castOther.getDicCode())))
                && ((this.getDicPcode() == castOther.getDicPcode()) || (this.getDicPcode() != null && castOther.getDicPcode() != null && this.getDicPcode().equals(castOther.getDicPcode())))  
                && ((this.getDicLevel() == castOther.getDicLevel()) || (this.getDicLevel() != null && castOther.getDicLevel() != null && this.getDicLevel().equals(  
                        castOther.getDicLevel())));  
    }  
  
    public int hashCode() {  
        int result = 17;  
  
        result = 37 * result + (getDicType() == null ? 0 : this.getDicType().hashCode());  
        result = 37 * result + (getDicCode() == null ? 0 : this.getDicCode().hashCode());
        result = 37 * result + (getDicPcode() == null ? 0 : this.getDicPcode().hashCode()); 
        result = 37 * result + (getDicLevel() == null ? 0 : this.getDicLevel().hashCode());    
        return result;  
    }  
}
